import { IContext, IUIService } from '@/core';
/**
 * 界面服务注册中心
 * 基于template/src/register/ui-service-register.ts.hbs生成
 *
 * @export
 * @class UIServiceRegister
 */
export class UIServiceRegister {
	/**
	 * 界面服务注册中心对象
	 *
	 * @private
	 * @static
	 * @type {UIServiceRegister}
	 * @memberof UIServiceRegister
	 */
	private static register: UIServiceRegister;

	/**
	 * Creates an instance of UIServiceRegister.
	 * 禁止使用new获取界面服务注册中心对象
	 * @memberof UIServiceRegister
	 */
	private constructor() {}

	/**
	 * 获取实体服务注册中心对象
	 *
	 * @static
	 * @return {*}  {UIServiceRegister}
	 * @memberof UIServiceRegister
	 */
	static getInstance(): UIServiceRegister {
		if (!this.register) {
			this.register = new UIServiceRegister();
		}
		return this.register;
	}

	/**
	 * 获取界面服务
	 *
	 * @param {string} name 界面名称
	 * @param {IContext} [context={}] 应用上下文
	 * @return {*}  {Promise<any>}
	 * @memberof UIServiceRegister
	 */
	public async getService(
		name: string,
		context: IContext = {}
	): Promise<IUIService> {
		const targetService: any = await (this as any)[`get${name}Service`](
			context
		);
		return targetService;
	}

	/**
	 * 图书服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZBOOKService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizbook/ibizbook-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 部门服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0019Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0019/ibiz-sample-0019-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 商品价格明细服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0009Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0009/ibiz-sample-0009-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 自定义服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZCustomService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-custom/ibiz-custom-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 硬件服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZHardwareService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-hardware/ibiz-hardware-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 员工服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0020Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0020/ibiz-sample-0020-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0017Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0017/ibiz-sample-0017-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 微组件服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getMicroComponentService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/micro-component/micro-component-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单明细服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0013Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0013/ibiz-sample-0013-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单明细服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZOrderDetailService(context: IContext = {}): Promise<IUIService> {
		return (
			await import(
				'@/ui-service/ibiz-order-detail/ibiz-order-detail-ui-service'
			)
		).default.getInstance(context);
	}

	/**
	 * 示例实体03服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0003Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0003/ibiz-sample-0003-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 嵌套流程（主）服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0006Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0006/ibiz-sample-0006-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0021Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0021/ibiz-sample-0021-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 应用部件服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZAPPCTRLService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizappctrl/ibizappctrl-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 软件服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSoftwareSuitService(
		context: IContext = {}
	): Promise<IUIService> {
		return (
			await import(
				'@/ui-service/ibiz-software-suit/ibiz-software-suit-ui-service'
			)
		).default.getInstance(context);
	}

	/**
	 * 任务团队服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZTASKTEAMService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiztaskteam/ibiztaskteam-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0012Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0012/ibiz-sample-0012-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单类型服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZOrderTypeService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-order-type/ibiz-order-type-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 多模式流程服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0005Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0005/ibiz-sample-0005-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 编辑器服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZAPPEDITORService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizappeditor/ibizappeditor-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 账户服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZAccountService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-account/ibiz-account-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZOrderService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-order/ibiz-order-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 示例数据库服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSampleService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample/ibiz-sample-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 客户服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZCustomerService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-customer/ibiz-customer-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 客户管理服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZCustomerMGService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-customer-mg/ibiz-customer-mg-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 员工服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0014Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0014/ibiz-sample-0014-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0010Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0010/ibiz-sample-0010-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 应用视图服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZAPPVIEWService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizappview/ibizappview-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 示例实体18服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0018Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0018/ibiz-sample-0018-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 项目服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0015Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0015/ibiz-sample-0015-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 示例实体01服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0001Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0001/ibiz-sample-0001-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 客户服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZCustomer_INTFService(
		context: IContext = {}
	): Promise<IUIService> {
		return (
			await import(
				'@/ui-service/ibiz-customer-intf/ibiz-customer-intf-ui-service'
			)
		).default.getInstance(context);
	}

	/**
	 * 嵌套流程（子）服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0007Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0007/ibiz-sample-0007-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 多版本流程服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0004Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0004/ibiz-sample-0004-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 自循环流程服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0008Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0008/ibiz-sample-0008-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 扩展编辑器服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZAPPEXTENDEDITORService(
		context: IContext = {}
	): Promise<IUIService> {
		return (
			await import(
				'@/ui-service/ibizappextendeditor/ibizappextendeditor-ui-service'
			)
		).default.getInstance(context);
	}

	/**
	 * 处理器服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZCPUService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizcpu/ibizcpu-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 示例实体02服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0002Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0002/ibiz-sample-0002-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 存储服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZStorageService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-storage/ibiz-storage-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 供货商服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSupplierService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-supplier/ibiz-supplier-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 任务服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZTASKService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiztask/ibiztask-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 动态数据看板服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getDYNADASHBOARDService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/dynadashboard/dynadashboard-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 统一产品（索引主实体）服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZUNIProductService(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibizuni-product/ibizuni-product-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 订单明细服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0011Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0011/ibiz-sample-0011-ui-service')
		).default.getInstance(context);
	}

	/**
	 * 项目成员服务
	 *
	 * @param {IContext} [context={}]
	 * @return {*}  {Promise<any>}
	 * @memberof EntityServiceRegister
	 */
	async getIBIZSample0016Service(context: IContext = {}): Promise<IUIService> {
		return (
			await import('@/ui-service/ibiz-sample-0016/ibiz-sample-0016-ui-service')
		).default.getInstance(context);
	}
}
